package com.liao.myblog.advice;

import com.liao.myblog.vo.ResultVO;
import org.springframework.web.bind.annotation.*;

@ControllerAdvice(basePackages = "com.liao.myblog.controller")
public class GlobalExceptionHandler {

    @ResponseBody
    @ExceptionHandler(Exception.class)
    public String exception(Exception e){
        e.printStackTrace();
        System.out.println("GlobalExceptionHandler.exception");
        return e.getMessage();
    }
}
